<?php

namespace App\Http\Controllers\Admin;

use App\Models\Packrecord;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class PackrecordController extends Controller
{


    public function __construct()
    {
        view()->share([
            '_orders' => 'am-in',
            '_packorder' => 'am-active',
        ]);
    }


        //会员挑战记录首页
    public function index($id){

//        当前挑战挑战记录关联挑战订单
        $packrecords=Packrecord::where('packorder_id',$id)->with('packorder.pack')->orderBy('inter_at')->get();

      return view('admin.order.packrecord',compact('packrecords'));

    }
}
